<?php
/**
 * Created by PhpStorm.
 * User: Guangpeng Chen
 * Date: 10-9/0009
 * Time: 14:27
 * 价格模板
 */
include('../common/autoload.php');
$action = trim($_REQUEST['action']);
$token  = $_REQUEST['token'];
$soap = SoapInit::GetSoapInside();
//检测登陆
//is_login();
$tpl = Tpl::getLink();
switch($action) {
    case 'add':
        break;
    case 'allProduct':
        $sale = new \pft\Prod\Sale($GLOBALS['le'], $_SESSION['memberID']);
        //可销售的产品=自己供应的产品+转分销的产品
        $cnt = $tpl->productsIdToRule(1, $_SESSION['memberID']);
        echo '{"status":"ok","cnt":'.$cnt.'}';
        break;
    case 'save':
        break;
}